﻿using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geometry;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace TrafficAccessibilityIndex
{
    interface IGravityModel
    {
        /// <summary>
        /// 根据layer和poiLayer计算网路距离集
        /// </summary>
        /// <param name="sw">保存网络距离的文件流</param>
        void CalcLayerNetDistance(ref StreamWriter sw);
        /// <summary>
        /// 计算网路距离集
        /// </summary>
        double CalcNetDistance(IPoint ptCell, IPoint ptPoi, int i, int j, List<NetPointInf> p_FeatureNPI, List<NetPointInf> p_PoiNPI);
        /// <summary>
        /// 从文件中读取网路距离集
        /// </summary>
        /// <param name="path">文件路径</param>
        void ReadLayerNetDistance(string path);
        /// <summary>
        /// 保存网路距离集
        /// </summary>
        /// <param name="path">文件路径</param>
        void SaveLayerNetDistance(string path);
        /// <summary>
        /// 计算图层所有要素可达性
        /// </summary>
        void CalcLayerAccessability();
        /// <summary>
        /// 计算中立模型的Dj
        /// </summary>
        /// <param name="name">要素某个属性的字段名，如格网人口字段</param>
        /// <returns>Dj</returns>
        List<double> CalcDvalues(string name);

    }
}
